<template>
  <div :class="$style.root">
    <el-form :inline="true" :model="formQuery" :label-width="labelWidth" label-position="right">
      <el-row>
        <el-col :span="5">
          <el-form-item label="任务ID">
            <el-input style="width: 90%" v-model="formQuery.id" placeholder="请输入" clearable />
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <el-form-item label="顶级渠道">
            <el-select style="width: 90%" clearable v-model="formQuery.topChannelCode" placeholder="请选择" filterable>
              <el-option v-for="item in topChannelList" :key="item.id" :label="item.name" :value="item.id" />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <el-form-item label="状态">
            <el-select style="width: 90%" clearable v-model="formQuery.status" placeholder="请选择" filterable>
              <el-option v-for="item in taskStatusList" :key="item.id" :label="item.name" :value="item.id" />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="7">
          <el-form-item label="创建时间">
            <el-date-picker
              v-model="formQuery.timeRange"
              type="datetimerange"
              range-separator="-"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              value-format="yyyy-MM-dd HH:mm:ss"
              style="width:90%;"
            >
            </el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <el-form-item>
            <el-button @click="onQuery" type="primary">查询</el-button>
            <el-button @click="onReset" type="info">重置</el-button>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>

<script>
import Index from './index';
export default Index;
</script>

<style lang="scss" module>
@import './index.module.scss';
</style>
